package net.comm.group.web.form;

import net.comm.page.PageCtr;

import org.apache.struts.action.*;
import org.apache.struts.upload.FormFile;


public class GPictureForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	private static final String KEY_SPLIT = "#,##,#,#,#";
	
	private String  QryOrderby;			//	
	private String  Isradnom = "";			//是否随机显示	
	
	private int  QryGAlbumID;	//
	private int  QryGroupID;		//群组ID
	private int  QryGpicID;		//
	private String  IsExNext;		//
	private String  IsExPrev;		//
	
	private int  GroupID;		//群组ID
	private String  Albumname;	//相册名称
	private String  Albuminfo;	//相册说明
	private String  Protect;	//隐私设置
	
	private int  GpicID;		//
	private int  GalbumID;		//
	private int  PicName;		//文件名
	private String  IsHead;		//是否作为封面
	private int  UpCnt;		//顶的总数
	private int  DownCnt;	//踩的总数
	private int  UserID;		//
	private String  Mtime;		//
	
	private int imgWidth;
	private int imgHeight;
	private FormFile  UpFile0;	//文件名
	private String  Descr0;		//
	private FormFile  UpFile1;	//文件名
	private String  Descr1;		//
	private FormFile  UpFile2;	//文件名
	private String  Descr2;		//
	private FormFile  UpFile3;	//文件名
	private String  Descr3;		//
	private FormFile  UpFile4;	//文件名
	private String  Descr4;		//	
	
	
	private String action = "";
	
	public GPictureForm() {
		super();
		// TODO Auto-generated constructor stub
		Clear();
	}
	
	public void Clear() {
		
		QryOrderby = "";
		Isradnom = "";	
		
		QryGAlbumID = 0;	//
		QryGroupID = 0;	//群组ID
		QryGpicID = 0;
		IsExNext = "";		//
		IsExPrev = "";		//		
		
		GroupID = 0;
		Albumname = "";	//相册名称
		Albuminfo = "";	//相册说明
		Protect = "";	//隐私设置
		
		GpicID = 0;		//
		GalbumID = 0;	//
		PicName = 0;	//文件名
		IsHead = "";	//是否作为封面
		UpCnt = 0;
		DownCnt = 0;
		UserID = 0;		//
		Mtime = "";		//	
		
		UpFile0 = null;
		UpFile1 = null;
		UpFile2 = null;
		UpFile3 = null;
		UpFile4 = null;
		Descr0 = "";
		Descr1 = "";
		Descr2 = "";
		Descr3 = "";
		Descr4 = "";			
	}
	/**
	 * 查询当前页主键值串
	 */
	private String key = "";

	/**
	 * 查询上上页主键值串
	 */
	private String lastKey = "";
	

	/**
	 * 分页控制对象
	 */
	private PageCtr page;
	



	public PageCtr getPage() {
		return page;
	}

	public void setPage(PageCtr page) {
		this.page = page;
	}
	
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String[] array) {
		if(key != null && key.trim().length() > 0) {
			key = "";
		}
		
		StringBuffer keyBuff = new StringBuffer();
		for (int i = 0; i < array.length; i++) 
		{
			/**
			 * 防止空字符串引起的split方法异常
			 */
			if(array[i] == null || array[i].length() == 0) {
				keyBuff.append(" ");
			} else {
				keyBuff.append(array[i]);
			}
			
			keyBuff.append(KEY_SPLIT);
		}
		
		key = keyBuff.toString();		
	}
	
	/**
	 * 获取lastKey值
	 * @return
	 */
	public String[] lastKey()
	{
		if(lastKey == null || lastKey.trim().length() == 0) {
			return null;
		}
		
		return lastKey.split(KEY_SPLIT);
	}
	
	public String getLastKey() {
		return lastKey;
	}

	public void setLastKey(String lastKey) {
		this.lastKey = lastKey;
	}	

	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}

	public static String getKEY_SPLIT() {
		return KEY_SPLIT;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}



	public String getIsHead() {
		return IsHead;
	}

	public void setIsHead(String isHead) {
		IsHead = isHead;
	}

	public FormFile getUpFile0() {
		return UpFile0;
	}

	public String getDescr0() {
		return Descr0;
	}

	public FormFile getUpFile1() {
		return UpFile1;
	}

	public String getDescr1() {
		return Descr1;
	}

	public FormFile getUpFile2() {
		return UpFile2;
	}

	public String getDescr2() {
		return Descr2;
	}

	public FormFile getUpFile3() {
		return UpFile3;
	}

	public String getDescr3() {
		return Descr3;
	}

	public FormFile getUpFile4() {
		return UpFile4;
	}

	public String getDescr4() {
		return Descr4;
	}

	public void setUpFile0(FormFile upFile0) {
		UpFile0 = upFile0;
	}

	public void setDescr0(String descr0) {
		Descr0 = descr0;
	}

	public void setUpFile1(FormFile upFile1) {
		UpFile1 = upFile1;
	}

	public void setDescr1(String descr1) {
		Descr1 = descr1;
	}

	public void setUpFile2(FormFile upFile2) {
		UpFile2 = upFile2;
	}

	public void setDescr2(String descr2) {
		Descr2 = descr2;
	}

	public void setUpFile3(FormFile upFile3) {
		UpFile3 = upFile3;
	}

	public void setDescr3(String descr3) {
		Descr3 = descr3;
	}

	public void setUpFile4(FormFile upFile4) {
		UpFile4 = upFile4;
	}

	public void setDescr4(String descr4) {
		Descr4 = descr4;
	}

	public String getQryOrderby() {
		return QryOrderby;
	}

	public String getIsradnom() {
		return Isradnom;
	}

	public int getQryGAlbumID() {
		return QryGAlbumID;
	}

	public int getQryGroupID() {
		return QryGroupID;
	}

	public int getGpicID() {
		return GpicID;
	}

	public int getGalbumID() {
		return GalbumID;
	}

	public int getPicName() {
		return PicName;
	}

	public int getUserID() {
		return UserID;
	}

	public String getMtime() {
		return Mtime;
	}

	public void setQryOrderby(String qryOrderby) {
		QryOrderby = qryOrderby;
	}

	public void setIsradnom(String isradnom) {
		Isradnom = isradnom;
	}

	public void setQryGAlbumID(int qryGAlbumID) {
		QryGAlbumID = qryGAlbumID;
	}

	public void setQryGroupID(int qryGroupID) {
		QryGroupID = qryGroupID;
	}

	public void setGpicID(int gpicID) {
		GpicID = gpicID;
	}

	public void setGalbumID(int galbumID) {
		GalbumID = galbumID;
	}

	public void setPicName(int picName) {
		PicName = picName;
	}

	public void setUserID(int userID) {
		UserID = userID;
	}

	public void setMtime(String mtime) {
		Mtime = mtime;
	}

	public String getIsExNext() {
		return IsExNext;
	}

	public void setIsExNext(String isExNext) {
		IsExNext = isExNext;
	}

	public String getIsExPrev() {
		return IsExPrev;
	}

	public void setIsExPrev(String isExPrev) {
		IsExPrev = isExPrev;
	}

	public int getGroupID() {
		return GroupID;
	}

	public void setGroupID(int groupID) {
		GroupID = groupID;
	}

	public String getAlbumname() {
		return Albumname;
	}

	public String getAlbuminfo() {
		return Albuminfo;
	}

	public String getProtect() {
		return Protect;
	}

	public void setAlbumname(String albumname) {
		Albumname = albumname;
	}

	public void setAlbuminfo(String albuminfo) {
		Albuminfo = albuminfo;
	}

	public void setProtect(String protect) {
		Protect = protect;
	}

	public int getUpCnt() {
		return UpCnt;
	}

	public int getDownCnt() {
		return DownCnt;
	}

	public void setUpCnt(int upCnt) {
		UpCnt = upCnt;
	}

	public void setDownCnt(int downCnt) {
		DownCnt = downCnt;
	}

	public int getQryGpicID() {
		return QryGpicID;
	}

	public void setQryGpicID(int qryGpicID) {
		QryGpicID = qryGpicID;
	}

	public int getImgWidth() {
		return imgWidth;
	}

	public void setImgWidth(int imgWidth) {
		this.imgWidth = imgWidth;
	}

	public int getImgHeight() {
		return imgHeight;
	}

	public void setImgHeight(int imgHeight) {
		this.imgHeight = imgHeight;
	}
	
	
	
}